<template>
  <div>
    <!--通用头部-->
    <div class="house-header">
      <div class="layui-container">
        <div class="house-nav">
        <span class="layui-breadcrumb visibility-unset">
            <span style="float: right" v-if="user.name===undefined">
              <router-link to="/user/register"><a>注册</a></router-link>
              <a class="margin-left-right10">|</a>
              <router-link to="/user/login"><a>登录</a></router-link>
              <a class="margin-left-right10">|</a>
              <a href="http://wpa.qq.com/msgrd?v=3&uin=483966038&site=qq&menu=yes">在线客服</a>
            </span>
            <span style="float: right" v-if="user.name!==undefined">
              <a href="javascript:void(0);">admin</a>
              <a class="margin-left-right10">|</a>
              <a href="javascript:void(0);">我的订单</a>
              <a class="margin-left-right10">|</a>
              <a href="javascript:void(0);" @click="logout">退出</a>
              <a class="margin-left-right10">|</a>
              <a href="http://wpa.qq.com/msgrd?v=3&uin=483966038&site=qq&menu=yes">在线客服</a>
            </span>
          </span>
<!--          <span class="layui-breadcrumb house-breadcrumb-icon" style="visibility: unset">-->
<!--            <a id="search"><i class="layui-icon layui-icon-house-find"></i></a>-->
<!--            <router-link to="/user/login"><i class="layui-icon layui-icon-username"></i></router-link>-->
<!--            <a href="javascript:void(0);"><i class="layui-icon layui-icon-house-shop"></i></a>-->
<!--          </span>-->
        </div>

        <div class="house-banner layui-form">
          <router-link to="/">
            <a class="banner">
              <img src="/logo.png" alt="logo">
            </a>
          </router-link>

          <div class="layui-input-inline">
            <input type="text" placeholder="搜索好物" class="layui-input"><i class="layui-icon layui-icon-house-find"></i>
          </div>
          <a class="shop" href="usershop.html"><i class="layui-icon layui-icon-house-shop"></i><span class="layui-badge">1</span></a>
        </div>
        <ul class="layui-nav close">
          <router-link to="/" tag="li"  class="layui-nav-item layui-this" active-class="active" exact><a>首页</a></router-link>
          <router-link to="/" tag="li" class="layui-nav-item" active-class="active"><a>居家用品</a></router-link>
          <router-link to="/" class="layui-nav-item" tag="li" active-class="active"><a>小家电</a></router-link>
          <router-link to="/" class="layui-nav-item" tag="li" active-class="active"><a>洗护</a></router-link>
          <router-link to="/" class="layui-nav-item" tag="li" active-class="active"><a>厨具</a></router-link>
          <router-link to="/" class="layui-nav-item" tag="li" active-class="active"><a>日用品</a></router-link>
        </ul>
        <button id="switch">
          <span></span><span class="second"></span><span class="third"></span>
        </button>
      </div>
    </div>

    <!--核心部分-->
    <nuxt/>

    <!--通用尾部-->
    <div class="house-footer">
      <div class="layui-container">
        <div class="intro">
          <span class="first"><i class="layui-icon layui-icon-house-shield"></i>7天无理由退换货</span>
          <span class="second"><i class="layui-icon layui-icon-house-car"></i>满99元全场包邮</span>
          <span class="third"><i class="layui-icon layui-icon-house-diamond"></i>100%品质保证</span>
          <span class="last"><i class="layui-icon layui-icon-house-tel"></i>客服400-2888-966</span>
        </div>
        <div class="about">
          <span class="layui-breadcrumb visibility-unset" >
            <a href="javascript:void(0);">关于我们</a>
            <a class="margin-left-right10">|</a>
            <a href="javascript:void(0);">帮助中心</a>
            <a class="margin-left-right10">|</a>
            <a href="javascript:void(0);">售后服务</a>
            <a class="margin-left-right10">|</a>
            <a href="javascript:void(0);">配送服务</a>
            <a class="margin-left-right10">|</a>
            <a href="javascript:void(0);">关于货源</a>
          </span>
          <p>家居商城版权所有 &copy; 2020-2200 </p>
        </div>
      </div>
    </div>
  </div>

</template>

<script>
  import '~/assets/layui/css/layui.css'
  import '~/assets/static/css/index.css'
  import { getUser } from '@/utils/auth'
  import { removeUser } from '@/utils/auth'

  export default {
    data() {
      return {
        user:{}
      }
    },
    created() {
      this.user= getUser();
    },
    methods: {
      logout(){
        removeUser();
        location.reload();
      },
    }
  }
</script>
<style>
  .margin-left-right10{
    margin-left: 10px;
    margin-right: 10px;
  }
  .visibility-unset{
    visibility: unset
  }
</style>

